package schema

import "time"

// 订单表中的商品信息 新版本
type OrderGoodsDetail struct {
	ClassID         string  `json:"class_id"`
	GoodsName       string  `json:"goods_name"`
	ContainerNum    string  `json:"container_num"`
	Univalent       float64 `json:"univalent"`
	GoodsID         string  `json:"goods_id"`
	ID              int64   `json:"id"`
	ChildOutTradeNo string  `json:"child_out_trade_no"`
}

// 订单表中的商品信息 老版本
type OrderGoodsDetailOld struct {
	ClassID         string  `json:"ClassID"`
	GoodsName       string  `json:"GoodsName"`
	ContainerNum    string  `json:"ContainerNum"`
	Univalent       float64 `json:"Univalent"`
	GoodsID         string  `json:"GoodsID"`
	ID              int64   `json:"Id"`
	ChildOutTradeNo string  `json:"ChildOutTradeNo"`
}

type OrderStatData struct {
	MerchantID          string         `json:"merchant_id"`
	SalesID             string         `json:"sales_id"`
	OrderStatus         int            `json:"order_status"`
	RobotName           string         `json:"robot_name"`
	Areas3              string         `json:"areas3"`
	Gmv                 float64        `json:"gmv"`
	MyPaymentAmount     float64        `json:"my_payment_amount"`
	MyDiscountAmount    float64        `json:"my_discount_amount"`
	MyOrderCount        int            `json:"my_order_count"`
	MyRefundOrderCount  int            `json:"my_refund_order_count"`
	MyRefundOrderAmount float64        `json:"my_refund_order_amount"`
	MyStartOrderCount   int            `json:"my_start_order_count"`
	MySuccessOrderCount int            `json:"my_success_order_count"`
	MyAllOrderCount     int            `json:"my_all_order_count"`
	MyFailedOrderCount  int            `json:"my_failed_order_count"`
	MyNotPayOrderCount  int            `json:"my_not_pay_order_count"`
	MyGoodsCount        int            `json:"my_goods_count"`
	FaceCount           float64        `json:"face_count"`
	FaceCount0          float64        `json:"face_count0"`
	FaceCount1          float64        `json:"face_count1"`
	FaceCount2          float64        `json:"face_count2"`
	FaceCount3          float64        `json:"face_count3"`
	UserName            string         `json:"user_name"`
	ClickNum            int            `json:"click_num"`
	PayNum              int            `json:"pay_num"`
	OrderPercent        float32        `json:"order_percent"`
	PersonCount         int            `json:"person_count"`
	PersonCountPercent  int            `json:"person_count_percent"`
	GoodsInfo           []GoodDataType `gorm:"-" json:"goods_info"`
	Name                string         `json:"name"`
}

type GoodDataType struct {
	CountData           string  `json:"count_data"`
	MyGoodsId           string  `json:"my_goods_id"`
	RobotName           string  `json:"robot_name"`
	SalesID             string  `json:"sales_id"`
	OrderID             string  `json:"order_id"`
	PaymentAmount       float32 `json:"payment_amount"`
	OrderStatus         int     `json:"order_status"`
	PayNum              int     `json:"pay_num"`
	RepeatPayNum        int     `json:"repeat_pay_num"`
	GoodsID             string  `json:"goods_id"`
	GoodsName           string  `json:"goods_name"`
	ClickNum            int     `json:"click_num"`
	Count               int     `json:"count"`
	Gmv                 float32 `json:"gmv"`
	MyPaymentAmount     float32 `json:"my_payment_amount"`
	MyRefundOrderAmount float32 `json:"my_refund_order_amount"`
	MyStartOrderCount   int     `json:"my_start_order_count"`
	MySuccessOrderCount int     `json:"my_success_order_count"`
	MyNotPayOrderCount  int     `json:"my_not_pay_order_count"`
	MyRefundOrderCount  int     `json:"my_refund_order_count"`
	OrderPercent        string  `json:"order_percent"`
}

type MyOrderInfo struct {
	OrderID             string    `gorm:"column:order_id" json:"order_id" json_old:"OrderID"`
	MerchantID          string    `gorm:"column:merchant_id" json:"merchant_id"`
	SalesID             string    `gorm:"column:sales_id" json:"sales_id" json_old:"SalesID"`
	AddTime             time.Time `json:"-" json_old:"AddTime"`
	AddTimeFormated     string    `json:"add_time"`
	RobotName           string    `json:"robot_name" json_old:"RobotName"`
	OutTradeNo          string    `json:"out_trade_no" json_old:"OutTradeNo"`
	ChildOutTradeNo     string    `json:"child_out_trade_no" json_old:"ChildOutTradeNo"`
	RefundTradeNo       string    `json:"refund_trade_no" json_old:"ReFunTradeNo"`
	OrderStatus         int       `json:"order_status" json_old:"OrderStatus"`
	End                 int       `json:"end" json_old:"End"`
	PaymentID           int8      `gorm:"column:payment_id" json:"payment_id" json_old:"PaymentID"`
	Areas1              int       `json:"areas1" json_old:"Areas1"`
	Areas2              int       `json:"areas2" json_old:"Areas2"`
	Areas3              int       `json:"areas3" json_old:"Areas3"`
	Areas4              int       `json:"areas4" json_old:"Areas4"`
	EndOutTradeNo       string    `json:"end_out_trade_no" json_old:"EndOutTradeNo"`
	CountData           string    `json:"count_data" json_old:"CountData"`
	TotalPaymentAmount  float64   `json:"total_payment_amount" json_old:"TotalPaymentAmount"`
	PaymentAmount       float64   `json:"payment_amount" json_old:"PaymentAmount"`
	ActualAmount        float64   `json:"actual_amount" json_old:"ActualAmount"`
	GoodsID             string    `gorm:"column:goods_id" json:"goods_id" json_old:"GoodsID"`
	ModifyTime          time.Time `json:"-" json_old:"ModifyTime"`
	ModifyTimeFormated  string    `json:"modify_time"`
	Remarks             string    `json:"remarks" json_old:"Remarks"`
	ErrorCode           string    `json:"error_code" json_old:"ErrorCode"`
	LogMsg              string    `json:"log_msg" json_old:"LogMsg"`
	OrigialOutTradeNo   string    `json:"origial_out_trade_no" json_old:"OrigialOutTradeNo"`
	CreatedAt           int64     `json:"created_at" gorm:"column:created_at;autoCreateTime;type:int;size:64;index:created_at;comment:创建时间"`
	UpdatedAt           int64     `json:"updated_at" gorm:"column:updated_at;autoUpdateTime;type:int;size:64;index:updated_at;comment:更新时间"`
	CouponCode          string    `json:"coupon_code" json_old:"CouponCode"`
	OrderSource         int       `json:"order_source" json_old:"OrderSource"`
	InventoryUnfreezeAt int       `json:"inventory_unfreeze_at" json_old:"InventoryUnfreezeAt"`
}
